import { WeaTools } from 'ecCom';

const car = {

  /* ------------------- 菜单1:车辆使用情况 -------------------*/
  // 车辆使用视图数据
  getCarReportData: params => WeaTools.callApi('/api/car/view/getCarReportData', 'POST', params),

  // 车辆使用视图下的报表
  getCarReportList: params => WeaTools.callApi('/api/car/view/getCarReportList', 'POST', params),

  // 获取车辆使用视图下的查询条件
  getCarViewSearchListCondition: params => WeaTools.callApi('/api/car/view/getCarViewSearchListCondition', 'GET', params),

  // 获取车辆创建流程数据
  getCarFlowCreateData: params => WeaTools.callApi('/api/car/view/getCarFlowCreateData', 'POST', params),

  // 获取车辆是否分权
  getCarDetachable: params => WeaTools.callApi('/api/car/view/getCarDetachable', 'POST', params),

  // 获取车辆使用视图设置
  getCarReportBaseData: params => WeaTools.callApi('/api/car/view/getCarReportBaseData', 'POST', params),

  // 根据流程id获取对应的表单字段
  getCarFlowField: params => WeaTools.callApi('/api/car/view/getCarFlowField', 'GET', params),

  // 获取系统时间
  getCarServerDateTime: params => WeaTools.callApi('/api/car/view/getCarServerDateTime', 'GET', params),

  // 车辆申请撤销
  doCancel: params => WeaTools.callApi('/api/car/view/doCancel', 'POST', params),

  // 单个车辆使用情况列表
  getCarUseSingtonList: params => WeaTools.callApi('/api/car/base/getCarUseSingtonList', 'GET', params),


  /* ------------------- 菜单2:车辆申请审批 -------------------*/
  // 车辆查询 - 列表
  getCarFlowList: params => WeaTools.callApi('/api/car/flow/getCarFlowList', 'GET', params),

  // 车辆查询 - 高级查询条件
  getCarFlowListCondition: params => WeaTools.callApi('/api/car/flow/getCarFlowListCondition', 'GET', params),


  /* ------------------- 菜单3:车辆查询 -------------------*/
  // 车辆查询 - 列表
  getCarSearchList: params => WeaTools.callApi('/api/car/search/getCarSearchList', 'GET', params),

  // 车辆查询 - 高级查询条件
  getCarSearchListCondition: params => WeaTools.callApi('/api/car/search/getCarSearchListCondition', 'GET', params),


  /* ------------------- 菜单4:车辆信息维护 -------------------*/
  // 车辆信息维护
  getCarList: params => WeaTools.callApi('/api/car/base/getCarList', 'GET', params),
  // 车辆新建和保存
  saveorupdateCar: params => WeaTools.callApi('/api/car/base/saveorupdateCar', 'POST', params),
  // 删除车辆信息
  delCarinfo: params => WeaTools.callApi('/api/car/base/delCarinfo', 'GET', params),
  // 获取车辆信息
  getCarInfo: params => WeaTools.callApi('/api/car/base/getCarInfo', 'GET', params),
  // 车辆类型select--新建和编辑车辆时需要使用车辆类型
  getCarTypeListData: params => WeaTools.callApi('/api/car/base/getCarTypeListData', 'GET', params),

  // 获取车辆信息
  getCarFormField: params => WeaTools.callApi('/api/car/base/getCarFormField', 'GET', params),

  // 车辆共享界面定义
  getCarShareFields: params => WeaTools.callApi('/api/car/base/getCarShareFields', 'POST', params),
  // 添加车辆共享
  saveShare: params => WeaTools.callApi('/api/car/base/saveShare', 'POST', params),
  // 查询车辆共享列表
  getShareList: params => WeaTools.callApi('/api/car/base/getShareList', 'POST', params),
  // 删除车辆共享
  delShare: params => WeaTools.callApi('/api/car/base/delShare', 'POST', params),
  /* ------------------- 车辆后台设置 -------------------*/
  // 获取车辆冲突提醒设置
  getCarApplySetting: params => WeaTools.callApi('/api/car/background/getCarApplySetting', 'GET', params),
  // 保存车辆冲突提醒设置
  saveCarApplySetting: params => WeaTools.callApi('/api/car/background/saveCarApplySetting', 'POST', params),
  // 获取车辆类型
  getCarType: params => WeaTools.callApi('/api/car/background/getCarType', 'GET', params),
  // 保存车辆类型
  saveOrUpdateCarType: params => WeaTools.callApi('/api/car/background/saveOrUpdateCarType', 'POST', params),
  // 删除车辆类型
  deleteCarType: params => WeaTools.callApi('/api/car/background/deleteCarType', 'POST', params),

  // 获取使用流程设置列表数据
  getUseCarWorkflowSetList: params => WeaTools.callApi('/api/car/UseCarSet/getUseCarWorkflowSetList', 'POST', params),

  getCreateUseCarWorkflowSet: params => WeaTools.callApi('/api/car/UseCarSet/getCreateUseCarWorkflowSetInitData', 'GET', params),

  submitCreateUseCarWorkflowSet: params => WeaTools.callApi('/api/car/UseCarSet/submitCreateUseCarWorkflowSet', 'POST', params),

  getAddUseCarWorkflowSetInitData: params => WeaTools.callApi('/api/car/UseCarSet/getAddUseCarWorkflowSetInitData', 'GET', params),

  getEditUseCarWorkflowSetInitData: params => WeaTools.callApi('/api/car/UseCarSet/getEditUseCarWorkflowSetInitData', 'GET', params),

  getWorkflowDetachable: params => WeaTools.callApi('/api/car/UseCarSet/getWorkflowDetachable', 'GET', params),

};

export default car;
